<template>
	<div>
		<u-table ref="table" v-loading="$parent.loading" :data="value" row-key="ID" :use-virtual="useVirtual"
			v-bind="$props" v-on="$listeners">
			<slot name="Referrer.NameBefore"></slot>
			<slot name="Referrer.Name">
				<u-table-column prop="Referrer.Name" :label="comLan['Key']['Referrer']['Name']" width="180" align="left"></u-table-column>
			</slot>
			<slot name="Referrer.NameAfter"></slot>
			<slot name="Referrer.PhoneBefore"></slot>
			<slot name="Referrer.Phone">
				<u-table-column prop="Referrer.Phone" :label="comLan['Key']['Referrer']['Phone']" width="50" align="left"></u-table-column>
			</slot>
			<slot name="Referrer.PhoneAfter"></slot>
			<slot name="Referrer.EnumStatusBefore"></slot>
			<slot name="Referrer.EnumStatus">
				<u-table-column prop="Referrer.EnumStatus" :label="comLan['Key']['Referrer']['EnumStatus']" width="50" align="center">
					<template v-slot="scope">
						<span v-html="getLabel(scope.row.Referrer.EnumStatus,EnumStatus)"></span>
					</template>
				</u-table-column>
			</slot>
			<slot name="Referrer.EnumStatusAfter"></slot>
			<slot name="Organization.NameBefore"></slot>
			<slot name="Organization.Name">
				<u-table-column prop="Organization.Name" :label="comLan['Key']['Organization']['Name']" width="180" align="left"></u-table-column>
			</slot>
			<slot name="Organization.NameAfter"></slot>
			<slot name="Organization.PhoneBefore"></slot>
			<slot name="Organization.Phone">
				<u-table-column prop="Organization.Phone" :label="comLan['Key']['Organization']['Phone']" width="50" align="left"></u-table-column>
			</slot>
			<slot name="Organization.PhoneAfter"></slot>
			<slot name="Organization.EnumStatusBefore"></slot>
			<slot name="Organization.EnumStatus">
				<u-table-column prop="Organization.EnumStatus" :label="comLan['Key']['Organization']['EnumStatus']" width="50" align="center">
					<template v-slot="scope">
						<span v-html="getLabel(scope.row.Organization.EnumStatus,EnumStatus)"></span>
					</template>
				</u-table-column>
			</slot>
			<slot name="Organization.EnumStatusAfter"></slot>
			
			<u-table-column2 v-if="showOp">
				<template v-slot="scope">
					<slot name="replace" :row='scope.row' :$index='scope.$index' :column="scope.column"
						:store="scope.store" :_self="scope._self">
						<slot name="btnEdit" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnEditParent(scope)" v-if="buttonParent.编辑">
								{{comLan["btnEdit"]}}
							</el-button>
						</slot>
						<slot name="btnEnumStatus" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnEnumStatusParent(scope,scope.row.EnumStatus==0?1:0)"
								v-if="buttonParent.启用禁用">
								{{scope.row.EnumStatus==0 ? comLan["btnEnable"] : comLan["btnDisable"]}}
							</el-button>
						</slot>
						<slot name="btnDel" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnDelParent(scope)" v-if="buttonParent.删除">
								{{comLan["btnDel"]}}
							</el-button>
						</slot>
						<slot :row='scope.row' :$index='scope.$index' :column="scope.column" :store="scope.store"
							:_self="scope._self"></slot>
					</slot>
				</template>
			</u-table-column2>
		</u-table>
		<el-pagination v-if="showPage" :current-page="$parent.search.index" :page-size="$parent.search.size"
			:total="$parent.total" @current-change="indexChangeParent" @size-change="sizeChangeParent"></el-pagination>
	</div>
</template>

<script>
	import common from "@/common/common.js";
	import js from "@/Partial/ReferrerOrganizationRelation/js.js";
	export default {
		name: "ReferrerOrganizationRelationListTable",
		mixins: [common.baseVM, js]
	}
</script>
